import commonData from "../../api/data"
import commonApi from "../../api/commonApi"
import logApi from "../../api/logApi"

Page({
  data: {
    rootImagePath: "https://h5.sx2b2c.com/images/shengxin_yunshenghuo_chajian/longbaoka_lijianjin/",
  },
  onLoad(option) {
    logApi.addKeepLog('页面加载传入参数 option' + JSON.stringify(option))
    if (option.a) {
      commonData.setA(option.a)
    }
    if (option.param) {
      commonData.setParam(option.param)
    }
    if (option.appid) {
      commonData.setAppid(option.appid)
    } 

    if (option.openid) {
      commonData.setOpenid(option.openid)
    }

    // 有问题无法使用，先放放，让使用方传入 commonApi.initOpenid()
  },
});